<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // console.log(Object.prototype) 原型对象
        // console.log(Object.prototype.__proto__) //null

        function Person() {

        }
        const son = new Person()
        // console.log(son.__proto__ === Person.prototype);//true
        // console.log(Person.prototype.__proto__ === Object.prototype) //true

        // instanceof检测对象在不在同一个原型链上
        console.log(son instanceof Person)//true
        console.log(son instanceof Object)//true
        console.log(son instanceof Array)//false
        console.log([1, 2, 3] instanceof Array)//true
        console.log(Array instanceof Object)//true 万物皆对象
    </script>
</body>

</html>